Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: auto-generate configuration from source code #518

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ematipico
Copy link
Member

@ematipico ematipico commented Jun 6, 2024

Summary

This is my attempt to create the configuration reference page from source code.

The drawback: we lose many examples
The con: we keep one source of truth

I see two options here:

  • Making our doc comments in the source more rich, with markdown examples and more. They will be rendered here.
  • Having use cases and examples in a separate page.

What do you think?

Note

The source code is still junk and needs some polish. For now I would like feedback on what we would like to do and how

Copy link

netlify bot commented Jun 6, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit 7ba048a
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/6661a0bcf9015d0008bf0996
😎 Deploy Preview https://deploy-preview-518--biomejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ematipico
Copy link
Member Author

@Sec-ant
Copy link
Member

Sec-ant commented Jun 7, 2024

The drawback: we lose many examples
The con: we keep one source of truth

Aren't "drawback" and "con" the same thing? 😄

I would prefer keeping the options and examples together so I don't have to jump back and forth across pages. And the preview link further determined my thought.

So it seems richer markdown doc comments the way to go. But I get the impression that pulldown-cmark doesn't handle rich markups very well. 🤔

@ematipico
Copy link
Member Author

ematipico commented Jun 7, 2024

Aren't "drawback" and "con" the same thing? 😄

That's how damanged my brain is 😆

I would prefer keeping the options and examples together so I don't have to jump back and forth across pages. And the preview link further determined my thought.

Yeah, that's what the original PR attempts to do, and I don't mind moving better docs and examples in the source code.

So it seems richer markdown doc comments the way to go. But I get the impression that pulldown-cmark doesn't handle rich markups very well. 🤔

I don't think we need pulldown-cmark for now. I think we just need to take the doc comments as they are, and write them.

Ok(())
}

fn generate_markdown_hearer() -> String {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i noticed a typo in my original function name... 🙏 It should be generate_markdown_header() and sorry for the mistake.

@Sec-ant
Copy link
Member

Sec-ant commented Jun 7, 2024

I don't think we need pulldown-cmark for now. I think we just need to take the doc comments as they are, and write them.

Oh yes, I was wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants